package com.sales.fallback;

import com.sales.controller.QuotationController;
import org.comple.erp.pojo.base.customer.CustomerType;
import org.comple.erp.remote.base.CustomerTypeRemote;
import org.comple.erp.utils.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Component
public class CustomerTypeClientFallback implements FallbackFactory<CustomerTypeRemote> {
    private final Logger logger = LoggerFactory.getLogger(CustomerTypeClientFallback.class);

    @Override
    public CustomerTypeRemote create(Throwable throwable) {
        return new CustomerTypeRemote() {


            @Override
            public AjaxResult selectCustomerTypeList(Map<String, Object> map) {
                logger.debug(throwable.toString()+"进行熔断处理");
                return null;
            }
        };
    }
}
